package com.lcx.movie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lcx.movie.entity.UserRating;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserRatingMapper extends BaseMapper<UserRating> {
    /**
     * 用户评分
     * @param userRating 评分实体
     * @return 受影响的行数
     */
    public int insertUserRating(UserRating userRating);

    /**
     * 查询用户评分
     * @param userName 用户名
     * @param movieCnName 电影名
     * @return 用户评分集合
     */
    public List<UserRating> selectUserRating(@Param("userName") String userName,@Param("movieCnName") String movieCnName);
}
